package com.iw.adoms.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.iw.core.orm.hibernate.BaseEntity;

@Entity
@Table(name = "marchandise")
public class Marchandise extends BaseEntity {

	private String name; // 商品名称
	private String code; // 商品编码
	private String description;// 商品描述
	private String packageing; // 包装
	private Double price; // 单价
	private String shelflife;// 保质期
	private String spcification; // 规格

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "type_id")
	private MarchandiseType type;// 商品类型

	private String dan;// 段位
	private Double weight; // 净重
	private Date produceDate; // 生产日期
	private String producePlace; // 产地

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "brand_id")
	private Brand brand; // 品牌

	private String barCode; // 条形码
	private Integer stockNumber; // 商品库存量
	private Integer numOfBox; // 每箱数量

	private String memo; // 备注

	private Double point = 0.0;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getPackageing() {
		return packageing;
	}

	public void setPackageing(String packageing) {
		this.packageing = packageing;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getShelflife() {
		return shelflife;
	}

	public void setShelflife(String shelflife) {
		this.shelflife = shelflife;
	}

	public String getSpcification() {
		return spcification;
	}

	public void setSpcification(String spcification) {
		this.spcification = spcification;
	}

	public MarchandiseType getType() {
		return type;
	}

	public void setType(MarchandiseType type) {
		this.type = type;
	}

	public String getDan() {
		return dan;
	}

	public void setDan(String dan) {
		this.dan = dan;
	}

	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public Date getProduceDate() {
		return produceDate;
	}

	public void setProduceDate(Date produceDate) {
		this.produceDate = produceDate;
	}

	public String getProducePlace() {
		return producePlace;
	}

	public void setProducePlace(String producePlace) {
		this.producePlace = producePlace;
	}

	public Brand getBrand() {
		return brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	public Integer getStockNumber() {
		return stockNumber;
	}

	public void setStockNumber(Integer stockNumber) {
		this.stockNumber = stockNumber;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Integer getNumOfBox() {
		return numOfBox;
	}

	public void setNumOfBox(Integer numOfBox) {
		this.numOfBox = numOfBox;
	}

	public Double getPoint() {
		return point;
	}

	public void setPoint(Double point) {
		this.point = point;
	}

}